package com.huatai.saas.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 场景列表
 * @TableName scene_file
 */
@Data
public class SceneFileDto implements Serializable {
	private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 文件名
     */
	@ApiModelProperty(value = "场景名称",required = true)
	@NotBlank(message = "场景名称不能为空")
    private String fileName;

    /**
     * 唯一标识,MD5
     */
	@ApiModelProperty(value = "唯一标识,MD5")
    private String identifier;

    /**
     * 本地地址
     */
	@ApiModelProperty(value = "本地地址")
    private String path;

	@ApiModelProperty("行业")
	private String industryKey;

	@ApiModelProperty(value = "场景轮播图地址")
	private List<PictureIsMainDto> pictureList;

    /**
     * 文件总大小
     */
	@ApiModelProperty(value = "文件总大小")
    private Long totalSize;

    /**
     * 创建时间
     */
	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
	@ApiModelProperty(value = "更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 版本号(V1.0.1)
     */
	@ApiModelProperty(value = "版本号v1")
    private String version;

    /**
     * 版本描述
     */
	@ApiModelProperty(value = "版本描述",required = true)
	@NotBlank(message = "版本描述不能为空")
    private String description;

	@ApiModelProperty(value = "场景内部唯一标识",required = true)
	@TableField("open_id")
//	@NotBlank(message = "场景内部唯一标识不能为空")
	private String openId;

	@ApiModelProperty(value = "场景文件状态(1.正常，0异常)")
	@TableField(value = "status")
	private Integer status;

	@ApiModelProperty(value = "底板价格")
	private BigDecimal price;

	@ApiModelProperty(value = "图片可访问地址")
	@TableField(exist = false)
	private String pictureUrl;
}
